package cn.yuanqiao.archive.wenjianzhengli.mapper;

import cn.yuanqiao.archive.appManager.domain.TenantItemFolder;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author zjj
 * @date 2023/6/25
 */
public interface TenantItemFolderMapper {

    int addItemFolder(TenantItemFolder itemFolder);

    List<String> selectFolderIdByItemId(@Param("itemId") String itemId, @Param("tableName") String tableName);

    List<String> selectItemIdByFolderId(@Param("folderIdsStr") String folderIdsStr, @Param("tableName") String tableName);

    int getCountByFolderIds(@Param("folderIds")String folderIds, @Param("tableName") String tableName);

    List<Long> getItemIdByFolderId(@Param("folderIdsStr")String folderIdsStr, @Param("folderTableName") String folderTableName, @Param("tableName") String tableName);

    int deleteItemFolderByFolderId(@Param("folderIds")String folderIds, @Param("tableName") String tableName);

    int deleteItemFolderByItemId(@Param("itemIds")String itemIds, @Param("tableName") String tableName);

    List<Map<String, Object>> selectItemList(@Param("ids")Long[] ids, @Param("tableName") String tableName);

    List<Map<String, String>> selectItemYqdaList(@Param("ids")Long[] ids, @Param("tenantCode") String tenantCode, @Param("fileTableName") String fileTableName);

    /**
     * 已归档
     */
    int getFolderNumByItemIdYGD(@Param("folderTableName") String folderTableName, @Param("tenantCode") String tenantCode, @Param("itemId") String itemId);

    Integer getDaNumByItemIdYGD(@Param("fileTableName")String fileTableName, @Param("folderTableName") String folderTableName
            , @Param("tenantCode") String tenantCode, @Param("itemId") String itemId);
}
